Skip to content

fix: Resolved the code quality issue#83

Merged
Roopan-Microsoft merged 1 commit into
devfrom
psl-codeq-fix
May 18, 2026
Merged

fix: Resolved the code quality issue#83
Roopan-Microsoft merged 1 commit into
devfrom
psl-codeq-fix

Conversation

@Prekshith-Microsoft
Copy link
Copy Markdown
Contributor

@Prekshith-Microsoft Prekshith-Microsoft commented May 18, 2026

This pull request makes a minor improvement to error handling in the Fabric ingestion and database setup scripts by standardizing the way the script exits on errors.

  • Error Handling Consistency:
    • Updated both fabric_data_ingester.py and fabric_database.py to use sys.exit(1) instead of exit(1) for exiting on unexpected errors. This is a best practice for scripts and ensures consistent behavior. [1] [2]
    • Added an import for the sys module in fabric_data_ingester.py to support this change.## Purpose
  • ...

Does this introduce a breaking change?

  • Yes
  • No

How to Test

  • Get the code
git clone [repo-address]
cd [repo-name]
git checkout [branch-name]
  • Test the code

What to Check

Verify that the following are valid

  • ...

Other Information

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR removes redundant exit(1) calls that immediately followed sys.exit(1) in two Fabric scripts, and adds the missing sys import to fabric_data_ingester.py to support its use of sys.exit.

Changes:

  • Remove unreachable exit(1) after sys.exit(1) in two scripts.
  • Add import sys to fabric_data_ingester.py.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
infra/scripts/fabric/fabric_database.py Removes unreachable exit(1) following sys.exit(1).
infra/scripts/fabric/fabric_data_ingester.py Adds import sys and removes unreachable exit(1) following sys.exit(1).

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@Roopan-Microsoft Roopan-Microsoft merged commit 23a7cda into dev May 18, 2026
9 checks passed
@Prekshith-Microsoft Prekshith-Microsoft deleted the psl-codeq-fix branch May 27, 2026 04:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants